From: Sebastian Keller Date: Fri, 27 Feb 2026 12:22:37 +0000 (+0100) Subject: workspaceAnimation: Assign movingWindow before creating window actors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~26^2~1^2~34 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=45fb9698a5a99ef9af7dc2155d6b6766818d5197;p=gnome-shell.git workspaceAnimation: Assign movingWindow before creating window actors The BaseWorkspaceGroup constructor calls _createWindows(), which uses _shouldShowWindow() to determine which actors to create for the animation. In WorkspaceGroup _shouldShowWindow() this depends on a comparison with this._movingWindow, which however only gets set after the BaseWorkspaceGroup constructor has been called. This was causing the moving window to no longer stick to the screen when moved between workspaces. Fixes: 96be47933 ("workspaceAnimation: Split out BaseWorkspaceGroup") Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8992 Part-of: --- diff --git a/js/ui/workspaceAnimation.js b/js/ui/workspaceAnimation.js index 5bb2a10a7..db4050a2a 100644 --- a/js/ui/workspaceAnimation.js +++ b/js/ui/workspaceAnimation.js @@ -16,7 +16,7 @@ export const WORKSPACE_SPACING = 100; export const BaseWorkspaceGroup = GObject.registerClass( class BaseWorkspaceGroup extends Clutter.Actor { - constructor(workspace, monitor) { + constructor(workspace, monitor, movingWindow) { super({ width: monitor.width, height: monitor.height, @@ -25,6 +25,7 @@ class BaseWorkspaceGroup extends Clutter.Actor { this._workspace = workspace; this._monitor = monitor; + this._movingWindow = movingWindow; this._windowRecords = []; this._createBackground(); @@ -94,9 +95,7 @@ class BaseWorkspaceGroup extends Clutter.Actor { export const WorkspaceGroup = GObject.registerClass( class WorkspaceGroup extends BaseWorkspaceGroup { constructor(workspace, monitor, movingWindow) { - super(workspace, monitor); - - this._movingWindow = movingWindow; + super(workspace, monitor, movingWindow); global.display.connectObject('restacked', () => this._syncStacking(), this); @@ -150,6 +149,10 @@ class WorkspaceGroup extends BaseWorkspaceGroup { export const WorkspaceBackground = GObject.registerClass( class WorkspaceBackground extends BaseWorkspaceGroup { + constructor(workspace, monitor) { + super(workspace, monitor, null); + } + _shouldShowWindow(window) { return this._isDesktopWindow(window) && this._windowIsOnThisMonitor(window);